﻿-- Script to create the core data for the RaidAssist application

-- Roles
delete from RA_Roles
insert into RA_Roles ([name])
values ('SysAdmin')
insert into RA_Roles ([name])
values ('GroupAdmin')
insert into RA_Roles ([name])
values ('ListAdmin')

-- Games
delete from RA_Games
insert into RA_Games ([name], abbreviatedName)
values ('The Lord Of The Rings Online', 'LOTRO')

declare @lotroId int
set @lotroId = scope_identity()

-- Races
delete from RA_Races
declare @dwarfId int
insert into RA_Races (gameId, [name], imageUrl, infoUrl)
values (@lotroId, 'Dwarf', 'http://content.level3.turbine.com/sites/lorebook.lotro.com/images/icons/race/1879073444.png', 'http://lorebook.lotro.com/wiki/Race:Dwarf')
set @dwarfId = scope_identity()

declare @elfId int
insert into RA_Races (gameId, [name], imageUrl, infoUrl)
values (@lotroId, 'Elf', 'http://content.level3.turbine.com/sites/lorebook.lotro.com/images/icons/race/1879073443.png', 'http://lorebook.lotro.com/wiki/Race:Elf')
set @elfId = scope_identity()

declare @hobbitId int
insert into RA_Races (gameId, [name], imageUrl, infoUrl)
values (@lotroId, 'Hobbit', 'http://content.level3.turbine.com/sites/lorebook.lotro.com/images/icons/race/1879073441.png', 'http://lorebook.lotro.com/wiki/Race:Hobbit')
set @hobbitId = scope_identity()

declare @manId int
insert into RA_Races (gameId, [name], imageUrl, infoUrl)
values (@lotroId, 'Man', 'http://content.level3.turbine.com/sites/lorebook.lotro.com/images/icons/race/1879073442.png', 'http://lorebook.lotro.com/wiki/Race:Race_of_Man')
set @manId = scope_identity()

-- Classes
delete from RA_Classes
declare @burglarId int
insert into RA_Classes (gameId, [name], imageUrl, infoUrl, canHeal, canTank, canCrowdControl, canDPS)
values (@lotroId, 'Burglar', 'http://content.level3.turbine.com/sites/lorebook.lotro.com/images/icons/class/burglar_icon64.png', 'http://lorebook.lotro.com/wiki/Class:Burglar', 0, 0, 1, 0)
set @burglarId = scope_identity()

declare @captainId int
insert into RA_Classes (gameId, [name], imageUrl, infoUrl, canHeal, canTank, canCrowdControl, canDPS)
values (@lotroId, 'Captain', 'http://content.level3.turbine.com/sites/lorebook.lotro.com/images/icons/class/captain_icon64.png', 'http://lorebook.lotro.com/wiki/Class:Captain', 0, 0, 0, 0)
set @captainId = scope_identity()

declare @championId int
insert into RA_Classes (gameId, [name], imageUrl, infoUrl, canHeal, canTank, canCrowdControl, canDPS)
values (@lotroId, 'Champion', 'http://content.level3.turbine.com/sites/lorebook.lotro.com/images/icons/class/champion_icon64.png', 'http://lorebook.lotro.com/wiki/Class:Champion', 0, 0, 0, 1)
set @championId = scope_identity()

declare @guardianId int
insert into RA_Classes (gameId, [name], imageUrl, infoUrl, canHeal, canTank, canCrowdControl, canDPS)
values (@lotroId, 'Guardian', 'http://content.level3.turbine.com/sites/lorebook.lotro.com/images/icons/class/gaurdian_icon64.png', 'http://lorebook.lotro.com/wiki/Class:Guardian', 0, 1, 0, 0)
set @guardianId = scope_identity()

declare @hunterId int
insert into RA_Classes (gameId, [name], imageUrl, infoUrl, canHeal, canTank, canCrowdControl, canDPS)
values (@lotroId, 'Hunter', 'http://content.level3.turbine.com/sites/lorebook.lotro.com/images/icons/class/hunter_icon64.png', 'http://lorebook.lotro.com/wiki/Class:Hunter', 0, 0, 0, 1)
set @hunterId = scope_identity()

declare @loreMasterId int
insert into RA_Classes (gameId, [name], imageUrl, infoUrl, canHeal, canTank, canCrowdControl, canDPS)
values (@lotroId, 'Lore-master', 'http://content.level3.turbine.com/sites/lorebook.lotro.com/images/icons/class/lore_master_icon64.png', 'http://lorebook.lotro.com/wiki/Class:Lore-master', 0, 0, 1, 0)
set @loreMasterId = scope_identity()

declare @minstrelId int
insert into RA_Classes (gameId, [name], imageUrl, infoUrl, canHeal, canTank, canCrowdControl, canDPS)
values (@lotroId, 'Minstrel', 'http://content.level3.turbine.com/sites/lorebook.lotro.com/images/icons/class/minstrel_icon64.png', 'http://lorebook.lotro.com/wiki/Class:Minstrel', 1, 0, 0, 0)
set @minstrelId = scope_identity()

declare @runeKeeperId int
insert into RA_Classes (gameId, [name], imageUrl, infoUrl, canHeal, canTank, canCrowdControl, canDPS)
values (@lotroId, 'Rune-keeper', 'http://content.level3.turbine.com/sites/lorebook.lotro.com/images/icons/class/runekeeper_icon64.png', 'http://lorebook.lotro.com/wiki/Class:Rune-keeper', 1, 0, 0, 1)
set @runeKeeperId = scope_identity()

declare @wardenId int
insert into RA_Classes (gameId, [name], imageUrl, infoUrl, canHeal, canTank, canCrowdControl, canDPS)
values (@lotroId, 'Warden', 'http://content.level3.turbine.com/sites/lorebook.lotro.com/images/icons/class/warden_icon64.png', 'http://lorebook.lotro.com/wiki/Class:Warden', 0, 1, 0, 0)
set @wardenId = scope_identity()

-- RaceClassMap
delete from RA_RaceClassMap

-- Dwarfs
insert into RA_RaceClassMap (raceId, classId)
values (@dwarfId, @championId)
insert into RA_RaceClassMap (raceId, classId)
values (@dwarfId, @guardianId)
insert into RA_RaceClassMap (raceId, classId)
values (@dwarfId, @hunterId)
insert into RA_RaceClassMap (raceId, classId)
values (@dwarfId, @minstrelId)
insert into RA_RaceClassMap (raceId, classId)
values (@dwarfId, @runeKeeperId)

-- Elves
insert into RA_RaceClassMap (raceId, classId)
values (@elfId, @championId)
insert into RA_RaceClassMap (raceId, classId)
values (@elfId, @guardianId)
insert into RA_RaceClassMap (raceId, classId)
values (@elfId, @hunterId)
insert into RA_RaceClassMap (raceId, classId)
values (@elfId, @loreMasterId)
insert into RA_RaceClassMap (raceId, classId)
values (@elfId, @minstrelId)
insert into RA_RaceClassMap (raceId, classId)
values (@elfId, @runeKeeperId)
insert into RA_RaceClassMap (raceId, classId)
values (@elfId, @wardenId)

-- Hobbits!
insert into RA_RaceClassMap (raceId, classId)
values (@hobbitId, @burglarId)
insert into RA_RaceClassMap (raceId, classId)
values (@hobbitId, @guardianId)
insert into RA_RaceClassMap (raceId, classId)
values (@hobbitId, @hunterId)
insert into RA_RaceClassMap (raceId, classId)
values (@hobbitId, @minstrelId)
insert into RA_RaceClassMap (raceId, classId)
values (@hobbitId, @wardenId)

-- Men
insert into RA_RaceClassMap (raceId, classId)
values (@manId, @burglarId)
insert into RA_RaceClassMap (raceId, classId)
values (@manId, @captainId)
insert into RA_RaceClassMap (raceId, classId)
values (@manId, @championId)
insert into RA_RaceClassMap (raceId, classId)
values (@manId, @guardianId)
insert into RA_RaceClassMap (raceId, classId)
values (@manId, @hunterId)
insert into RA_RaceClassMap (raceId, classId)
values (@manId, @loreMasterId)
insert into RA_RaceClassMap (raceId, classId)
values (@manId, @minstrelId)
insert into RA_RaceClassMap (raceId, classId)
values (@manId, @wardenId)
